USE [SIAR]

DROP TABLE Prato_Insumo

GO

/****** Object:  Table [dbo].[Prato_Insumo]    Script Date: 01/06/2010 09:47:05 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Prato_Insumo](
	[ID_Prato] [int] NULL,
	[ID_Insumo] [int] NULL,
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Quantidade] [float] NULL,
 CONSTRAINT [PK_Prato_Insumo] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[Prato_Insumo]  WITH CHECK ADD  CONSTRAINT [FK_Prato_Insumo_Insumo] FOREIGN KEY([ID_Insumo])
REFERENCES [dbo].[Insumo] ([ID])
GO

ALTER TABLE [dbo].[Prato_Insumo] CHECK CONSTRAINT [FK_Prato_Insumo_Insumo]
GO

ALTER TABLE [dbo].[Prato_Insumo]  WITH CHECK ADD  CONSTRAINT [FK_Prato_Insumo_Prato] FOREIGN KEY([ID_Prato])
REFERENCES [dbo].[Prato] ([ID])
GO

ALTER TABLE [dbo].[Prato_Insumo] CHECK CONSTRAINT [FK_Prato_Insumo_Prato]
GO


